<?php

error_reporting(E_ALL | E_STRICT);

if (!defined('PHPUnit_MAIN_METHOD')) {
    define('PHPUnit_MAIN_METHOD', 'mysql_AllTests::main');
    chdir(dirname(dirname(__FILE__)));
}

/**
 * Require PHPUnit_TextUI_Runner and PDODB_TestSuite
 */
require_once 'PHPUnit/TextUI/TestRunner.php';
require_once 'PDODB/TestSuite.php';

/**
 * Require tests
 */
require_once 'PDODB/ConnectionTest.php';
require_once 'PDODB/QueryTest.php';
require_once 'PDODB/ManagerTest.php';

/**
 * A test suite for the PDODB_mysql subpackage.
 *
 * @package     PDODB
 * @subpackage  mysql
 * @category    Database
 * @author      Michael J. I. Jackson <mjijackson@gmail.com>
 */
class mysql_AllTests
{

    public static function main()
    {
        PHPUnit_TextUI_TestRunner::run(self::suite());
    }

    public static function suite()
    {
        $suite = new PDODB_TestSuite('PDODB_mysql Test Suite'); // name is important!

        $suite->addTestSuite('PDODB_ConnectionTest');
        $suite->addTestSuite('PDODB_QueryTest');
        $suite->addTestSuite('PDODB_ManagerTest');

        return $suite;
    }

}

if (PHPUnit_MAIN_METHOD == 'mysql_AllTests::main') {
    mysql_AllTests::main();
}

?>
